package com.pubinfo.passbook.common.entity;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pubinfo.passbook.common.handler.TNewSourceInvoiceItemTypeHandler;
import com.pubinfo.passbook.common.handler.TNewSourceInvoiceTollHandler;
import com.pubinfo.passbook.common.handler.TSourceBankReconciliationStatementDetailsTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author xuhong
 * @since 2022-07-01
 */
@Data
@Accessors(chain = true)
@TableName("t_new_source_invoice")
@ApiModel(value = "TNewSourceInvoice对象", description = "")
public class TNewSourceInvoice implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("发票唯一标识")
    @TableId(value = "unique_code_of_invoice", type = IdType.ASSIGN_ID)
    @JSONField(name="uniqueCodeOfInvoice")
    private String uniqueCodeOfInvoice;

    @ApiModelProperty("发票类型")
    @TableField("type_of_invoice")
    @JSONField(name="typeOfInvoice")
    private String typeOfInvoice;

    @ApiModelProperty("发票所属地区")
    @TableField("location_of_invoice")
    @JSONField(name="locationOfInvoice")
    private String locationOfInvoice;

    @ApiModelProperty("机器编号")
    @TableField("number_of_invoice_machine")
    @JSONField(name="numberOfInvoiceMachine")
    private String numberOfInvoiceMachine;

    @ApiModelProperty("发票特殊标识1")
    @TableField("special_invoice_type")
    @JSONField(name="specialInvoiceType")
    private String specialInvoiceType;

    @ApiModelProperty("发票特殊标识2")
    @TableField("invoice_issuing_sign")
    @JSONField(name="invoiceIssuingSign")
    private String invoiceIssuingSign;

    @ApiModelProperty("发票代码")
    @TableField("code_of_invoice")
    @JSONField(name="codeOfInvoice")
    private String codeOfInvoice;

    @ApiModelProperty("发票号码")
    @TableField("number_of_invoice")
    @JSONField(name="numberOfInvoice")
    private String numberOfInvoice;

    @ApiModelProperty("开票日期")
    @TableField("date_of_issue")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(name="dateOfIssue")
    private Date dateOfIssue;

    @ApiModelProperty("加工日期")
    @TableField("date_of_machining")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(name="dateOfMachining")
    private Date dateOfMachining;

    @ApiModelProperty("机打号码")
    @TableField("machine_number")
    @JSONField(name="machineNumber")
    private String machineNumber;

    @ApiModelProperty("校验码")
    @TableField("identifying_code")
    @JSONField(name="identifyingCode")
    private String identifyingCode;

    @ApiModelProperty("购买方_名称")
    @TableField("name_of_purchaser")
    @JSONField(name="nameOfPurchaser")
    private String nameOfPurchaser;

    @ApiModelProperty("购买方_纳税人识别号")
    @TableField("taxpayer_identification_number_of_purchaser")
    @JSONField(name="taxpayerIdentificationNumberOfPurchaser")
    private String taxpayerIdentificationNumberOfPurchaser;

    @ApiModelProperty("购买方_地址、电话")
    @TableField("address_phone_number_of_purchaser")
    @JSONField(name="addressPhoneNumberOfPurchaser")
    private String addressPhoneNumberOfPurchaser;

    @ApiModelProperty("购买方_开户行及账号")
    @TableField("deposit_bank_and_account_number_of_purchaser")
    @JSONField(name="depositBankAndAccountNumberOfPurchaser")
    private String depositBankAndAccountNumberOfPurchaser;

    @ApiModelProperty("密码区")
    @TableField("security_code")
    @JSONField(name="securityCode")
    private String securityCode;

    @ApiModelProperty("项目")
    @TableField(value = "information_of_taxable_goods_or_services_detail_items_tuple",typeHandler = TNewSourceInvoiceItemTypeHandler.class)
    @JSONField(name="informationOfTaxableGoodsOrServicesDetailItemsTuple")
    private List<TNewSourceInvoiceItem> informationOfTaxableGoodsOrServicesDetailItemsTuple=new ArrayList<>();

    @ApiModelProperty("通行费项目")
    @TableField(value = "information_of_toll_fee_detail_items_tuple",typeHandler = TNewSourceInvoiceTollHandler.class)
    @JSONField(name="informationOfTollFeeDetailItemsTuple")
    private List<TNewSourceInvoiceToll> informationOfTollFeeDetailItemsTuple=new ArrayList<>();

    @ApiModelProperty("合计_金额")
    @TableField("total_amount_excluding_tax")
    @JSONField(name="totalAmountExcludingTax")
    private BigDecimal totalAmountExcludingTax;

    @ApiModelProperty("合计_税额")
    @TableField("total_tax_amount")
    @JSONField(name="totalTaxAmount")
    private BigDecimal totalTaxAmount;

    @ApiModelProperty("价税合计（大写）")
    @TableField("tax_included_amount_in_words")
    @JSONField(name="taxIncludedAmountInWords")
    private String taxIncludedAmountInWords;

    @ApiModelProperty("价税合计（小写）")
    @TableField("tax_included_amount_in_figures")
    @JSONField(name="taxIncludedAmountInFigures")
    private BigDecimal taxIncludedAmountInFigures;

    @ApiModelProperty("销售方_名称")
    @TableField("name_of_seller")
    @JSONField(name="nameOfSeller")
    private String nameOfSeller;

    @ApiModelProperty("销售方_纳税人识别号")
    @TableField("taxpayer_identification_number_of_seller")
    @JSONField(name="taxpayerIdentificationNumberOfSeller")
    private String taxpayerIdentificationNumberOfSeller;

    @ApiModelProperty("销售方_地址、电话")
    @TableField("address_phone_number_of_seller")
    @JSONField(name="addressPhoneNumberOfSeller")
    private String addressPhoneNumberOfSeller;

    @ApiModelProperty("销售方_开户行及账号")
    @TableField("deposit_bank_and_account_number_of_seller")
    @JSONField(name="depositBankAndAccountNumberOfSeller")
    private String depositBankAndAccountNumberOfSeller;

    @ApiModelProperty("备注")
    @TableField("remarks")
    @JSONField(name="remarks")
    private String remarks;

    @ApiModelProperty("收款人")
    @TableField("payee")
    @JSONField(name="payee")
    private String payee;

    @ApiModelProperty("复核")
    @TableField("reviewer")
    @JSONField(name="reviewer")
    private String reviewer;

    @ApiModelProperty("开票人")
    @TableField("issuer")
    @JSONField(name="issuer")
    private String issuer;

    @ApiModelProperty("权责发生制下收入所属期起")
    @TableField("beginning_of_income_period_under_accrual_basis")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(name="beginningOfIncomePeriodUnderAccrualBasis")
    private Date beginningOfIncomePeriodUnderAccrualBasis;

    @ApiModelProperty("权责发生制下收入所属期止")
    @TableField("end_of_income_period_under_accrual_basis")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(name="endOfIncomePeriodUnderAccrualBasis")
    private Date endOfIncomePeriodUnderAccrualBasis;

    @ApiModelProperty("原发票代码")
    @TableField("code_of_original_invoice")
    @JSONField(name="codeOfOriginalInvoice")
    private String codeOfOriginalInvoice;

    @ApiModelProperty("原发票号码")
    @TableField("number_of_original_invoice")
    @JSONField(name="numberOfOriginalInvoice")
    private String numberOfOriginalInvoice;

    @ApiModelProperty("冲红原因")
    @TableField("reason_of_rush_red")
    @JSONField(name="reasonOfRushRed")
    private String reasonOfRushRed;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty("保存数据")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    @JSONField(name="dataJson")
    private JSONObject dataJson;

    @JSONField(name="inv:UniqueCodeOfInvoice",serialize = false)
    public void setUniqueCodeOfInvoice(String uniqueCodeOfInvoice) {
        this.uniqueCodeOfInvoice = uniqueCodeOfInvoice;
    }

    @JSONField(name="inv:TypeOfInvoice",serialize = false)
    public void setTypeOfInvoice(String typeOfInvoice) {
        this.typeOfInvoice = typeOfInvoice;
    }

    @JSONField(name="inv:LocationOfInvoice",serialize = false)
    public void setLocationOfInvoice(String locationOfInvoice) {
        this.locationOfInvoice = locationOfInvoice;
    }

    @JSONField(name="inv:NumberOfInvoiceMachine",serialize = false)
    public void setNumberOfInvoiceMachine(String numberOfInvoiceMachine) {
        this.numberOfInvoiceMachine = numberOfInvoiceMachine;
    }

    @JSONField(name="inv:SpecialInvoiceType",serialize = false)
    public void setSpecialInvoiceType(String specialInvoiceType) {
        this.specialInvoiceType = specialInvoiceType;
    }

    @JSONField(name="inv:InvoiceIssuingSign",serialize = false)
    public void setInvoiceIssuingSign(String invoiceIssuingSign) {
        this.invoiceIssuingSign = invoiceIssuingSign;
    }

    @JSONField(name="inv:CodeOfInvoice",serialize = false)
    public void setCodeOfInvoice(String codeOfInvoice) {
        this.codeOfInvoice = codeOfInvoice;
    }

    @JSONField(name="inv:NumberOfInvoice",serialize = false)
    public void setNumberOfInvoice(String numberOfInvoice) {
        this.numberOfInvoice = numberOfInvoice;
    }

    @JSONField(name="inv:DateOfIssue",serialize = false)
    public void setDateOfIssue(Date dateOfIssue) {
        this.dateOfIssue = dateOfIssue;
    }

    @JSONField(name="inv:DateOfMachining",serialize = false)
    public void setDateOfMachining(Date dateOfMachining) {
        this.dateOfMachining = dateOfMachining;
    }

    @JSONField(name="inv:MachineNumber",serialize = false)
    public void setMachineNumber(String machineNumber) {
        this.machineNumber = machineNumber;
    }

    @JSONField(name="inv:IdentifyingCode",serialize = false)
    public void setIdentifyingCode(String identifyingCode) {
        this.identifyingCode = identifyingCode;
    }

    @JSONField(name="inv:NameOfPurchaser",serialize = false)
    public void setNameOfPurchaser(String nameOfPurchaser) {
        this.nameOfPurchaser = nameOfPurchaser;
    }

    @JSONField(name="inv:TaxpayerIdentificationNumberOfPurchaser",serialize = false)
    public void setTaxpayerIdentificationNumberOfPurchaser(String taxpayerIdentificationNumberOfPurchaser) {
        this.taxpayerIdentificationNumberOfPurchaser = taxpayerIdentificationNumberOfPurchaser;
    }

    @JSONField(name="inv:AddressPhoneNumberOfPurchaser",serialize = false)
    public void setAddressPhoneNumberOfPurchaser(String addressPhoneNumberOfPurchaser) {
        this.addressPhoneNumberOfPurchaser = addressPhoneNumberOfPurchaser;
    }

    @JSONField(name="inv:DepositBankAndAccountNumberOfPurchaser",serialize = false)
    public void setDepositBankAndAccountNumberOfPurchaser(String depositBankAndAccountNumberOfPurchaser) {
        this.depositBankAndAccountNumberOfPurchaser = depositBankAndAccountNumberOfPurchaser;
    }

    @JSONField(name="inv:SecurityCode",serialize = false)
    public void setSecurityCode(String securityCode) {
        this.securityCode = securityCode;
    }

    @JSONField(name="inv:InformationOfTaxableGoodsOrServicesDetailItemsTuple",serialize = false)
    public void setInformationOfTaxableGoodsOrServicesDetailItemsTuple(List<TNewSourceInvoiceItem> informationOfTaxableGoodsOrServicesDetailItemsTuple) {
        this.informationOfTaxableGoodsOrServicesDetailItemsTuple = informationOfTaxableGoodsOrServicesDetailItemsTuple;
    }

    @JSONField(name="inv:InformationOfTollFeeDetailItemsTuple",serialize = false)
    public void setInformationOfTollFeeDetailItemsTuple(List<TNewSourceInvoiceToll> informationOfTollFeeDetailItemsTuple) {
        this.informationOfTollFeeDetailItemsTuple = informationOfTollFeeDetailItemsTuple;
    }

    @JSONField(name="inv:TotalAmountExcludingTax",serialize = false)
    public void setTotalAmountExcludingTax(BigDecimal totalAmountExcludingTax) {
        this.totalAmountExcludingTax = totalAmountExcludingTax;
    }

    @JSONField(name="inv:TotalTaxAmount",serialize = false)
    public void setTotalTaxAmount(BigDecimal totalTaxAmount) {
        this.totalTaxAmount = totalTaxAmount;
    }

    @JSONField(name="inv:TaxIncludedAmountInWords",serialize = false)
    public void setTaxIncludedAmountInWords(String taxIncludedAmountInWords) {
        this.taxIncludedAmountInWords = taxIncludedAmountInWords;
    }

    @JSONField(name="inv:TaxIncludedAmountInFigures",serialize = false)
    public void setTaxIncludedAmountInFigures(BigDecimal taxIncludedAmountInFigures) {
        this.taxIncludedAmountInFigures = taxIncludedAmountInFigures;
    }

    @JSONField(name="inv:NameOfSeller",serialize = false)
    public void setNameOfSeller(String nameOfSeller) {
        this.nameOfSeller = nameOfSeller;
    }

    @JSONField(name="inv:TaxpayerIdentificationNumberOfSeller",serialize = false)
    public void setTaxpayerIdentificationNumberOfSeller(String taxpayerIdentificationNumberOfSeller) {
        this.taxpayerIdentificationNumberOfSeller = taxpayerIdentificationNumberOfSeller;
    }

    @JSONField(name="inv:AddressPhoneNumberOfSeller",serialize = false)
    public void setAddressPhoneNumberOfSeller(String addressPhoneNumberOfSeller) {
        this.addressPhoneNumberOfSeller = addressPhoneNumberOfSeller;
    }

    @JSONField(name="inv:DepositBankAndAccountNumberOfSeller",serialize = false)
    public void setDepositBankAndAccountNumberOfSeller(String depositBankAndAccountNumberOfSeller) {
        this.depositBankAndAccountNumberOfSeller = depositBankAndAccountNumberOfSeller;
    }

    @JSONField(name="inv:Remarks",serialize = false)
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @JSONField(name="inv:Payee",serialize = false)
    public void setPayee(String payee) {
        this.payee = payee;
    }

    @JSONField(name="inv:Reviewer",serialize = false)
    public void setReviewer(String reviewer) {
        this.reviewer = reviewer;
    }

    @JSONField(name="inv:Issuer",serialize = false)
    public void setIssuer(String issuer) {
        this.issuer = issuer;
    }

    @JSONField(name="inv:BeginningOfIncomePeriodUnderAccrualBasis",serialize = false)
    public void setBeginningOfIncomePeriodUnderAccrualBasis(Date beginningOfIncomePeriodUnderAccrualBasis) {
        this.beginningOfIncomePeriodUnderAccrualBasis = beginningOfIncomePeriodUnderAccrualBasis;
    }

    @JSONField(name="inv:EndOfIncomePeriodUnderAccrualBasis",serialize = false)
    public void setEndOfIncomePeriodUnderAccrualBasis(Date endOfIncomePeriodUnderAccrualBasis) {
        this.endOfIncomePeriodUnderAccrualBasis = endOfIncomePeriodUnderAccrualBasis;
    }

    @JSONField(name="inv:CodeOfOriginalInvoice",serialize = false)
    public void setCodeOfOriginalInvoice(String codeOfOriginalInvoice) {
        this.codeOfOriginalInvoice = codeOfOriginalInvoice;
    }

    @JSONField(name="inv:NumberOfOriginalInvoice",serialize = false)
    public void setNumberOfOriginalInvoice(String numberOfOriginalInvoice) {
        this.numberOfOriginalInvoice = numberOfOriginalInvoice;
    }

    @JSONField(name="inv:ReasonOfRushRed",serialize = false)
    public void setReasonOfRushRed(String reasonOfRushRed) {
        this.reasonOfRushRed = reasonOfRushRed;
    }

}
